<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="g" uri="http://geni-max.com/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
		<meta http-equiv="Cache-Control" content="no-cache" />
		<meta http-equiv="Expires" content="0" />
		<title>卓越网络管理系统</title>
		<link rel="stylesheet" type="text/css" href="../css/public.css" />
		<script type="text/javascript" src="../js/ext-3.0.3/adapter/ext/ext-base.js" charset="UTF-8"></script>
		<script type="text/javascript" src="../js/ext-3.0.3/ext-all.js" charset="UTF-8"></script>
		<script type="text/javascript" src="../js/ext-3.0.3/source/locale/ext-lang-zh_CN.js" charset="UTF-8"></script>
	</head>
	<body>
		<form method="post" action="roomProject!process.action" style="margin-top:1px;">
		<input type="hidden" name="id" value="${roomProject.id}" />
		<input type="hidden" name="taskId" value="${taskId}" />
		<table class="tab">
			<jsp:include page="base_info.jsp" />
			<jsp:include page="base_info2.jsp" />
		</table>
		<table class="tab">
			<tr>
				<td class="label" width="12%">操作说明：</td>
				<td>
					<textarea rows="3" name="operateRemark"></textarea>
				</td>
			</tr>
			<tr>
				<td colspan="8" class="tcenter">
					<input type="hidden" id="actionName" name="actionName" value="审核通过" />
					<input type="hidden" id="dataType" name="dataTypeStr" value="${dataTypeStr}" />
					<button type="submit" onclick="document.getElementById('actionName').value = '审核通过'">审核通过</button>
					<button type="submit" onclick="if (!confirm('确定要暂缓至保留库吗？')) {return false;} document.getElementById('actionName').value = '暂缓至保留库';document.getElementById('dataType').value = 'BAK'">暂缓至保留库</button>
					<button type="submit" onclick="if (!confirm('确定要退回吗？')) {return false;} document.getElementById('actionName').value = '退回'">退回</button>
				</td>
			</tr>
		</table>
		</form>
	</body>
</html>
<script language="javascript">
function checkNetType(nettype){
	var gsmchecked = document.getElementById('gsmzs').checked;
	var tdchecked = document.getElementById('tdzs').checked;
	var wlanchecked = document.getElementById('wlanzs').checked;
	var ltechecked = document.getElementById('ltezs').checked;
	if(nettype == 'gsmzs'){
		var itemnumber = document.getElementById('itemnumber').value;
		if(gsmchecked == true){
			document.getElementById('gsmterm').disabled = false;
			document.getElementById('gsmtype').disabled = false;
			document.getElementById('wlanzs').disabled=true;
			document.getElementById('wlanterm').disabled = true;
			document.getElementById('wlantype').disabled = true;
			document.getElementById('itemnumber').value ='G'+itemnumber.substring(1);
		}else{
			if(tdchecked == false && ltechecked == false){
				document.getElementById('wlanzs').disabled=false;
				document.getElementById('wlanterm').disabled = false;
				document.getElementById('wlantype').disabled = false;
			}
			document.getElementById('gsmterm').disabled = true;
			document.getElementById('gsmtype').disabled = true;
			document.getElementById('itemnumber').value ='X'+itemnumber.substring(1);
		}
	}
	if(nettype == 'tdzs'){
		var itemnumber = document.getElementById('itemnumber').value;
		if(tdchecked == true){
			document.getElementById('tdterm').disabled = false;
			document.getElementById('tdtype').disabled = false;
			document.getElementById('wlanzs').disabled=true;
			document.getElementById('wlanterm').disabled = true;
			document.getElementById('wlantype').disabled = true;
			document.getElementById('itemnumber').value =itemnumber.substring(0,1)+'T'+itemnumber.substring(2);
		}else{
			if(gsmchecked == false && ltechecked == false){
				document.getElementById('wlanzs').disabled=false;
				document.getElementById('wlanterm').disabled = false;
				document.getElementById('wlantype').disabled = false;
			}
			document.getElementById('tdterm').disabled = true;
			document.getElementById('tdtype').disabled = true;
			document.getElementById('itemnumber').value =itemnumber.substring(0,1)+'X'+itemnumber.substring(2);
		}
	}
	
	if(nettype == 'ltezs'){
		var itemnumber = document.getElementById('itemnumber').value;
		if(ltechecked == true){
			document.getElementById('lteterm').disabled = false;
			document.getElementById('ltetype').disabled = false;
			document.getElementById('wlanzs').disabled=true;
			document.getElementById('wlanterm').disabled = true;
			document.getElementById('wlantype').disabled = true;
			document.getElementById('itemnumber').value =itemnumber.substring(0,2)+'L'+itemnumber.substring(3);
		}else{
			if(gsmchecked == false && tdchecked == false){
				document.getElementById('wlanzs').disabled=false;
				document.getElementById('wlanterm').disabled = false;
				document.getElementById('wlantype').disabled = false;
			}
			document.getElementById('lteterm').disabled = true;
			document.getElementById('ltetype').disabled = true;
			document.getElementById('itemnumber').value =itemnumber.substring(0,2)+'X'+itemnumber.substring(3);
		}
	}
	if(nettype == 'wlanzs'){
		var itemnumber = document.getElementById('itemnumber').value;
		if(wlanchecked == true){
			document.getElementById('wlanterm').disabled = false;
			document.getElementById('wlantype').disabled = false;
			document.getElementById('gsmzs').disabled=true;
			document.getElementById('tdzs').disabled=true;
			document.getElementById('ltezs').disabled=true;
			document.getElementById('gsmterm').disabled=true;
			document.getElementById('tdterm').disabled = true;
			document.getElementById('lteterm').disabled = true;
			document.getElementById('gsmtype').disabled = true;
			document.getElementById('tdtype').disabled = true;
			document.getElementById('ltetype').disabled = true;
			document.getElementById('itemnumber').value =itemnumber.substring(0,3)+'W'+itemnumber.substring(4);
		}else{
			document.getElementById('wlanterm').disabled = true;
			document.getElementById('wlantype').disabled = true;
			document.getElementById('gsmzs').disabled=false;
			document.getElementById('tdzs').disabled=false;
			document.getElementById('ltezs').disabled=false;
			document.getElementById('gsmterm').disabled=false;
			document.getElementById('tdterm').disabled =false;
			document.getElementById('lteterm').disabled =false;
			document.getElementById('gsmtype').disabled = false;
			document.getElementById('tdtype').disabled = false;
			document.getElementById('ltetype').disabled = false;
			document.getElementById('itemnumber').value =itemnumber.substring(0,3)+'X'+itemnumber.substring(4);
		}
	}
}
Ext.onReady(function() {
	var wlanterm = "${roomProject.wlanTerm}";
	var nettype="${roomProject.netType}";
	var newCreate = "${roomProject.newCreate}";
	if(newCreate =='是'){
		document.getElementById('relatedcode').value="关联编码";
		document.getElementById('relatedcode').disabled = true;
	}else{
		document.getElementById('relatedcode').disabled = false;
	}
	if(wlanterm == null || wlanterm == ""){
		document.getElementById('wlanterm').disabled = true;
		document.getElementById('wlantype').disabled = true;
		if(nettype.indexOf('GSM')!=-1){
			document.getElementById('gsmzs').value="GSM";
			document.getElementById('gsmzs').checked=true;
		}
		if(nettype.indexOf('TD')!=-1){
			document.getElementById('tdzs').value="TD";
			document.getElementById('tdzs').checked=true;
		}
		if(nettype.indexOf('LTE')!=-1){
			document.getElementById('ltezs').value="LTE";
			document.getElementById('ltezs').checked=true;
		}
		document.getElementById('wlanzs').disabled=true;
	}else{
		document.getElementById('gsmterm').disabled = true;
		document.getElementById('gsmtype').disabled = true;
		document.getElementById('tdterm').disabled = true;
		document.getElementById('tdtype').disabled = true;
		document.getElementById('lteterm').disabled = true;
		document.getElementById('ltetype').disabled = true;
		if(nettype.indexOf('WLAN')!=-1){
			document.getElementById('wlanzs').value="WLAN";
			document.getElementById('wlanzs').checked=true;
		}
		document.getElementById('gsmzs').disabled=true;
		document.getElementById('tdzs').disabled=true;
		document.getElementById('ltezs').disabled=true;
	}
});
</script>